package com.twu.biblioteca.command;

import com.twu.biblioteca.service.BookService;
import com.twu.biblioteca.view.MessageView;

public class ShowAllBooks extends Command{
    private final BookService bookService;

    public ShowAllBooks(BookService bookService, MessageView messageView) {
        super(messageView);
        this.bookService = bookService;
    }

    @Override
    public void execute() {
        getMessageView().showMessageList(bookService.getBookNames(bookService.getAllBooks()));
    }
}
